package triDataStruct;

import triStorage.*;

public class ReadableMap {
	private IReader reader;
	
	public ReadableMap(IReader reader) {
		this.reader = reader;
	}
	
	public String nextKey() {
		Integer flag;
		while (true) {
			flag = reader.readInt();
			if (flag == null)
				return null;
			if (flag == 0) {
				reader.skipString();
				reader.readInt();
			}
			else
				break;
		}
		return reader.readString();
	}
	
	public Integer nextValue() {
		return reader.readInt();
	}
	
	public void dispose() {
		reader.dispose();
	}
}
